package com.zysd.collection.scheduler.service.channel;

import com.zysd.collection.scheduler.dao.ChannelStateDao;
import com.zysd.collection.scheduler.entity.ChannelState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

/**
 * Created by ht on 2017/3/9.
 */
@Service
public class ChannelStateServiceImpl implements ChannelStateService {

    private final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @Autowired
    private ChannelStateDao channelStateDao;
    @Override
    @Transactional
    public int updateById(ChannelState dto) {
        return channelStateDao.updateById(dto);
    }

    @Override
    @Transactional
    public int insert(ChannelState dto) {
        return channelStateDao.insert(dto);
    }

    @Override
    public ChannelState byId(ChannelState dto) {
        return channelStateDao.byId(dto);
    }

}
